class UsersController < AdminController

  # render new.rhtml
  def new
    @page_title = "Creation d'un utilisateur"
	respond_to do |format|
      format.html
      format.js
    end
  end

  def create
    @user = User.new(params[:user])
    @user.save!
    flash[:notice] = "Création de l'utilisateur #{@user.login} effectué"
    self.current_user = @user
	respond_to do |format|
      format.html {redirect_back_or_default('/')}
      format.js
    end
  rescue ActiveRecord::RecordInvalid
    render :action => 'new'
  end

end
